package cn.matezk.cloud.dao;

import cn.matezk.cloud.beans.DeviceExt;
import cn.matezk.cloud.beans.DeviceSearch;
import cn.matezk.cloud.beans.SimpleDevice;
import cn.matezk.cloud.model.Device;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface DeviceDao {
    int insertSelective(Device device);
    Device selectByPrimaryKey(String deviceId);
    int updateByPrimaryKeySelective(Device device);
    int unbind(String deviceId);
    int deleteByPrimaryKey(String deviceId);
    int updateExpireDate(@Param("deviceId") String deviceId, @Param("expireDate")Date expireDate);
    int updateAmount(@Param("deviceId") String deviceId, @Param("amount")Integer amount);
    List<String> selectIccidIsEmpty();
    List<DeviceExt> batchQueryDeviceExt(List<String> deviceIds);
    List<SimpleDevice> search(DeviceSearch deviceSearch);
    int resetNotifyConfig(String deviceId);
}
